package com.example.thirdstage_project.common;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @author 86158
 * @version 1.0
 * Create by 2022/11/17 18:43
 */

@Data
@AllArgsConstructor
@NoArgsConstructor
public class Result<T> {
    //token
    private String token;
    private Object data;
    private Integer code;
    private String msg;



//    public Result() {
//    }
    public Result(String token, Integer code,Object data, String msg) {
        this.token = token;
        this.data = data;
        this.code = code;
        this.msg = msg;
    }
    public Result( Integer code,Object data, String msg) {
        this.data = data;
        this.code = code;
        this.msg = msg;
    }

    public Result(Integer code,Object data) {
        this.data = data;
        this.code = code;
    }

    public Object getData() {
        return data;
    }

    public void setData(Object data) {
        this.data = data;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

}
